package ecoll.client.database;

import java.io.Serializable;
import java.util.Date;

public class ProfileData implements Serializable {

	private String login;
	private String mail;
	private String firstName;
	private String lastName;
	private String photoBlobKey;
	private Long birthDate;
	private String description;

	private Long registerDate;
	private Long lastLoginDate;
	private Long languageLevel;

	public ProfileData() {
	}

	public ProfileData(String login, String mail, String firstName,
			String lastName, String photoBlobKey, Date birthDate,
			String description, Date registerDate, Date lastLoginDate,
			long languageLevel) {
		
		setLogin(login);
		setMail(mail);
		setFirstName(firstName);
		setLastName(lastName);
		setPhotoBlobKey(photoBlobKey);
		setBirthDate(birthDate);
		setDescription(description);
		setRegisterDate(registerDate);
		setLastLoginDate(lastLoginDate);
		setLanguageLevel(languageLevel);
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getPhotoBlobKey() {
		return photoBlobKey;
	}

	public void setPhotoBlobKey(String photoBlobKey) {
		this.photoBlobKey = photoBlobKey;
	}

	public Date getBirthDate() {
		if(birthDate == null) return null;
		return new Date(birthDate);
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = (birthDate == null) ? null : birthDate.getTime();
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getRegisterDate() {
		return new Date(registerDate);
	}

	public void setRegisterDate(Date registerDate) {
		this.registerDate = (registerDate == null) ? null : registerDate
				.getTime();
	}

	public Date getLastLoginDate() {
		return new Date(lastLoginDate);
	}

	public void setLastLoginDate(Date lastLoginDate) {
		this.lastLoginDate = (lastLoginDate == null) ? null : lastLoginDate
				.getTime();
	}

	public long getLanguageLevel() {
		return languageLevel;
	}

	public void setLanguageLevel(long languageLevel) {
		this.languageLevel = languageLevel;
	}
}
